package org.xserver.component.listener;

/**
 * The JMX's MBean for threadPool, support basic monitoring
 * 
 * @author idoldefine
 * @since 2013/12/09
 * 
 */
public interface XServerMemoryAwareThreadPoolExecutorStatusMBean {
	/**
	 * Get active thread number
	 * 
	 * @return active thread number
	 */
	public int getActiveThreads();

	/**
	 * Get active task number
	 * 
	 * @return running task number
	 */
	public int getActiveTasks();

	/**
	 * Get total task number, i.e. running task number, queued task number
	 * 
	 * @return total task number
	 */
	public int getTotalTasks();

	/**
	 * Get queued task number
	 * 
	 * @return the queued task number
	 */
	public int getQueuedTasks();

	/**
	 * Get current tasks average spending time
	 * 
	 * @return task average spending time
	 */
	public double getAverageTaskTime();

	/**
	 * Get active task names
	 * 
	 * @return the active task names
	 */
	public String[] getActiveTaskNames();

	/**
	 * Get queued task names
	 * 
	 * @return the queued task names
	 */
	public String[] getQueuedTaskNames();
}
